import request from '@/utils/Request'
import { stringify } from 'qs';

export async function getList(params) {
  return request(`/joker/roles/queryList?${stringify(params)}`, {
    method: 'GET'
  });
}

export async function queryById(params) {
  return request(`/joker/roles/queryById?${stringify(params)}`, {
    method: 'GET'
  });
}

export async function deleteById(params) {
  return request(`/joker/roles/delete?${stringify(params)}`, {
    method: 'GET'
  });
}

export async function updateRole(params) {
  return request('/joker/roles/update', {
    method: 'POST',
    data: {
      ...params
    }
  });
}

export async function addRole(params) {
  return request('/joker/roles/add', {
    method: 'POST',
    data: {
      ...params
    }
  });
}

